<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>循环 - 过滤</title>
    <script src="https://unpkg.com/vue@next"></script>
  </head>
  <body>
    <div id="Application">
      <h1>对象数组</h1>
      <ul>
        <li v-for="(item,index) in doFilter(list) ">
          <div>{{(index+1) + "." + item.name}}</div>
          <div>{{item.num}}</div> 
        </li>
      </ul>
    </div>
  </body>

  <script>
    const App= {
      data(){
        return {
            list:[{
              name:"frank",
              num:"151xxxxxxxxx"
            },{
              name:"jjie",
              num:"151xxxxxxxxx"
            },{
              name:"ttian",
              num:"151xxxxxxxxx"
            },{
              name:"dduo",
              num:"151xxxxxxxxx"
            },{
              name:"llin",
              num:"151xxxxxxxxx"
            }]
        }
      },
      methods:{
        doFilter(l){
          return l.filter(obj=> obj.name!="llin");
        }
      }
    }
    Vue.createApp(App).mount("#Application")
  </script>

</html>